package com.ziyun.erp.web.modules.member.controller;

import com.ziyun.erp.modules.member.service.ConfigBaseSettingService;
import io.renren.common.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author jiangli
 * @date 2018-08-13 14:46
 */
@RestController
@RequestMapping(value = "/member")
public class MemberLicenseController {

    @Autowired
    private ConfigBaseSettingService configBaseSettingService;

    /**
     * 查询注册协议和隐私保护
     */
    @RequestMapping("/selectBaseSetting/{key}")
    public R info(@PathVariable String key) {

        return configBaseSettingService.info(key);
    }

    /**
     * 修改注册协议和隐私保护
     */
    @PostMapping(value = "updateBaseSetting/{key}")
    public Map<String, Object> updateBaseSetting(@PathVariable String key, String text) {
        return configBaseSettingService.updateBaseSetting(key, text);
    }


}
